/*
** adv_magic_gem.cpp
*/

#ifndef ADV_MAGIC_GEMS_H_INCLUDED
#define ADV_MAGIC_GEMS_H_INCLUDED

#include "adv_object_type.h"
#include "stationary_adventure_object.h"

class t_creature_stack;
class t_creature_select_window;
class t_hero;

class t_adv_magic_gem : public t_stationary_adventure_object
{

public:
        
	t_adv_magic_gem(  std::string const& source, t_qualified_adv_object_type const& type );
	virtual void    activate_trigger( t_army* army, t_adv_map_point const& point, 
		                                   t_direction direction, t_adventure_frame* frame );

	virtual float	ai_value( t_adventure_ai const& ai, t_creature_array const& army, int move_cost ) const;
	virtual bool    read( std::streambuf&						stream, 
					      t_qualified_adv_object_type const&	type,
					      int									version );
	virtual bool    write( std::streambuf& stream ) const;
    
protected:
    
	t_magic_gem_type            m_gem_type;
	t_creature_select_window*   m_hero_selection_window;

    void hero_selection_change( t_creature_select_window*, t_creature_stack* );
};

#endif // ADV_MAGIC_GEMS_H_INCLUDED
